﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DA.HMI.Controls
{
    /// <summary>
    /// PlcSetting.xaml 的交互逻辑
    /// </summary>
    public partial class PlcSetting : UserControl
    {
        public PlcSetting()
        {
            InitializeComponent();
        }

        public string ID
        {
            get { return (string)GetValue(IDProperty); }
            set { SetValue(IDProperty, value); }
        }

        public static readonly DependencyProperty IDProperty =
            DependencyProperty.Register("ID", typeof(string), typeof(PlcSetting), new PropertyMetadata(string.Empty));


        public string IP
        {
            get { return (string)GetValue(IPProperty); }
            set { SetValue(IPProperty, value); }
        }

        public static readonly DependencyProperty IPProperty =
            DependencyProperty.Register("IP", typeof(string), typeof(PlcSetting), new PropertyMetadata(string.Empty));


        public int Port
        {
            get { return (int)GetValue(PortProperty); }
            set { SetValue(PortProperty, value); }
        }

        public static readonly DependencyProperty PortProperty =
            DependencyProperty.Register("Port", typeof(int), typeof(PlcSetting), new PropertyMetadata(0));


        public string HeartBeat
        {
            get { return (string)GetValue(HeartBeatProperty); }
            set { SetValue(HeartBeatProperty, value); }
        }

        public static readonly DependencyProperty HeartBeatProperty =
            DependencyProperty.Register("HeartBeat", typeof(string), typeof(PlcSetting), new PropertyMetadata(string.Empty));
    }
}
